//服务器全部接口返回的数据类型
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean
}

//SKU的平台属性值的ts类型
export interface SkuAttr {
    id?: number,
    attrId: string | number,
    valueId: string | number,
    valueName?: string
}

//SKU的销售属性值的ts类型
export interface SkuSaleAttr {
    id?: number,
    saleAttrId: string | number,
    saleAttrValueId: string | number,
    saleAttrValueName: string
}

//Sku照片墙的ts类型
export interface SkuImg {
    id?: number,
    createTime?: string,
    updateTime?: string,
    skuId?: number,
    imgName?: string,
    imgUrl?: string,
    name?: string,
    url?: string
}

//SKU数据的ts类型
export interface SkuData {
    category3Id?: string |number,
    spuId?: string | number,
    tmId?: string | number,
    skuName?: string,
    price?: string | number,
    weight?: string | number,
    skuDesc?: string,
    skuAttrValueList?: SkuAttr[],
    skuSaleAttrValueList?: SkuSaleAttr[],
    skuImageList?: SkuImg[],
    skuDefaultImg?: string,
    isSale?: number,
    id?: number
}

//服务器返回SKU数据的ts类型
export interface SkuInfoData extends ResponseData {
    data: {
        records: SkuData[],
        total: number,
        size: number,
        current: number,
        orders: [],
        optimizeCountSql: boolean,
        hitCount: boolean,
        countId: null,
        maxLimit: null,
        searchCount: boolean,
        pages: number
    }
}

//获取SKU商品详情接口的ts类型
export interface SkuMessageData extends ResponseData {
    data: SkuData
}

